<?php
@ session_start();

include_once("../projet_candidature/class.lib/db.class.php");
include_once("../projet_candidature/class.lib/user.class.php");
include_once("../projet_candidature/class.lib/diplome.class.php");
include_once("../projet_candidature/class.lib/cours.class.php");
include_once("../projet_candidature/class.lib/domaine.class.php");
include_once("../projet_candidature/class.lib/mention.class.php");
include_once("../projet_candidature/class.lib/niveau.class.php");
include_once("../projet_candidature/class.lib/unite_en.class.php");

include_once("../projet_candidature/class.lib/email.class.php");


//@ini_set('display_errors', 'on');


$email_db=new email();

if(isset($_GET["code_ue"])){
$email_db->SELECT($email_db->get_name_code_ue()."=".$_GET["code_ue"]." order by ".$email_db->get_name_date_envoi().' DESC');
}



//var_dump($conc);

?>

<div style="overflow:auto;height:300px;">
<h2 align="center">Historique des e-mails</h2>
<table class="MYTABLE" align="center" border="2" >
  <tr class="MYTABLE">
		<!--<th class="MYTABLE"><?php echo $langue["info_historique_mail.nom"];?></th>
		<th class="MYTABLE"><?php echo $langue["info_historique_mail.prenom"];?></th>
		-->
		<th class="MYTABLE">mail</th>
		<th class="MYTABLE">contenu</th>
		<th class="MYTABLE">date_envoi</th>
		<!--
		<th class="MYTABLE"><?php echo $langue["info_monbre_concepteur.cin"];?></th>
		<th class="MYTABLE"><?php echo $langue["info_monbre_concepteur.tel"];?></th>
		<th class="MYTABLE"><?php echo $langue["info_monbre_concepteur.univ"];?></th>
		<th class="MYTABLE"><?php echo $langue["info_monbre_concepteur.etab"];?></th>
		<th class="MYTABLE">Rôle</th>
		-->
	</tr>
<?php 



while($email_db->fetch_object())
{		
		/*info personne*/

	
		
		echo "<tr  class=\"MYTABLE\">";
		//echo "<td class=\"MYTABLE\">".$email_db->get_id_mail()."</td>";
		//echo "<td class=\"MYTABLE\">".$email_db->get_code_ue()."</td>";
		echo "<td class=\"MYTABLE\">".$email_db->get_distinataire()."</td>";
		echo "<td class=\"MYTABLE\">".$email_db->get_message()."</td>";
		echo "<td class=\"MYTABLE\">".$email_db->get_date_envoi()."</td>";
		
		
		echo "</tr>";
}

?>
</table>
</div>